export ST2_HOSTNAME="{{ st2_ngx_domain }}"

#####################################################################
# Hubot settings

# set if you don’t have a valid SSL certificate.
export NODE_TLS_REJECT_UNAUTHORIZED="${NODE_TLS_REJECT_UNAUTHORIZED:-0}"

# Hubot port - must be accessible from StackStorm
export EXPRESS_PORT="${EXPRESS_PORT:-8081}"

# Log level
export HUBOT_LOG_LEVEL="${HUBOT_LOG_LEVEL:-debug}"

# Bot name
export HUBOT_NAME="${HUBOT_NAME:-hubot}"
export HUBOT_ALIAS="${HUBOT_ALIAS:-!}"

######################################################################
# StackStorm settings

# StackStorm API endpoint.
export ST2_API_URL="http://{{ ansible_default_ipv4.address }}:{{ st2_port.api }}"

# StackStorm auth endpoint.
export ST2_AUTH_URL="http://{{ ansible_default_ipv4.address }}:{{ st2_port.auth }}"

# StackStorm stream endpoint.
export ST2_STREAM_URL="http://{{ ansible_default_ipv4.address }}:{{ st2_port.stream }}"

# StackStorm API key
export ST2_API_KEY="{{ st2_api_token.json.key }}"

# ST2 credentials. Fill in to use any stackstorm account.
# ST2 username:password pair will result in authentication token re-generation.
# (Uncomment ST2_AUTH_URL, ST2_AUTH_USERNAME, ST2_AUTH_PASSWORD and comment out ST2_API_KEY)
#export ST2_AUTH_USERNAME="${ST2_AUTH_USERNAME:-st2admin}"
#export ST2_AUTH_PASSWORD="${ST2_AUTH_PASSWORD:-testp}"

# Public URL of StackStorm instance: used it to offer links to execution details in a chat.
export ST2_WEBUI_URL="${ST2_WEBUI_URL:-https://${ST2_HOSTNAME}}"

######################################################################
# Chat service adapter settings

# Uncomment one of the adapter blocks below.
# Currently supported:
#   - slack
#   - botframework (Microsoft Teams)
#   - hipchat
#   - xmpp
#   - flowdock
#   - spark
#   - irc
#   - matteruser
#   - rocketchat
# For using other adapters refer to the "Using an external adapter" doc:
# https://docs.stackstorm.com/chatops/chatops.htm

# Slack settings (https://github.com/slackhq/hubot-slack):
#
# export HUBOT_ADAPTER=slack
# Obtain the Slack token from your app page at api.slack.com, it's the "Bot
# User OAuth Access Token" in the "OAuth & Permissions" section.
# export HUBOT_SLACK_TOKEN=xoxb-CHANGE-ME-PLEASE
# Uncomment the following line to force hubot to exit if disconnected from slack.
# export HUBOT_SLACK_EXIT_ON_DISCONNECT=1

# Microsoft Teams settings (https://github.com/Microsoft/BotFramework-Hubot)
# Uses the BotFramework
#
# export HUBOT_ADAPTER=botframework
# export BOTBUILDER_APP_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
# export BOTBUILDER_APP_PASSWORD=<password>
# Optional:
# BotBuilder endpoint - defaults to /api/messages
# export BOTBUILDER_ENDPOINT=/api/messages
# When set to true, restricts sending commands to hubot to a specific set of
# users in Teams. Messages from all non-Teams channels are blocked.
# Authorization is disabled by default.
# export HUBOT_TEAMS_ENABLE_AUTH=false
# Required if HUBOT_TEAMS_ENABLE_AUTH is true. A comma-separated list of user
# principal names (UPNs). The users on this list will be admins and able to
# send commands to hubot when the hubot is first run with authorization
# enabled.
# export HUBOT_TEAMS_INITIAL_ADMINS=''
# Comma seperated list of Office365 tenant IDs that are allowed to communicate
# with your hubot. By default ALL Office365 tenants can communicate with your
# hubot if they sideload your application manifest.
# export HUBOT_OFFICE365_TENANT_FILTER=''

# HipChat settings (https://github.com/hipchat/hubot-hipchat):
#
# export HUBOT_ADAPTER=hipchat
# export HUBOT_HIPCHAT_JID=CHANGE-ME-PLEASE
# export HUBOT_HIPCHAT_PASSWORD=CHANGE-ME-PLEASE
#
# Uncomment for HipChat Server:
# export HUBOT_HIPCHAT_XMPP_DOMAIN=btf.hipchat.com

# XMPP settings (https://github.com/markstory/hubot-xmpp):
#
# export HUBOT_ADAPTER=xmpp
# export HUBOT_XMPP_USERNAME=CHANGE-ME-PLEASE
# export HUBOT_XMPP_PASSWORD=CHANGE-ME-PLEASE
# export HUBOT_XMPP_ROOMS=CHANGE-ME-PLEASE
# export HUBOT_XMPP_HOST=CHANGE-ME-PLEASE
# export HUBOT_XMPP_PORT=CHANGE-ME-PLEASE

# FlowDock settings (https://github.com/flowdock/hubot-flowdock):
#
# export HUBOT_ADAPTER=flowdock
# export HUBOT_FLOWDOCK_API_TOKEN=CHANGE-ME-PLEASE
# export HUBOT_FLOWDOCK_LOGIN_EMAIL=CHANGE-ME-PLEASE
# export HUBOT_FLOWDOCK_LOGIN_PASSWORD=CHANGE-ME-PLEASE

# Cisco Spark settings (https://github.com/tonybaloney/hubot-spark):
#
# export HUBOT_ADAPTER=spark
# export HUBOT_SPARK_API_URI=https://api.ciscospark.com/v1
# export HUBOT_SPARK_ACCESS_TOKEN=CHANGE-ME-PLEASE
# export HUBOT_SPARK_ROOMS=CHANGE-ME-PLEASE

# IRC settings (https://github.com/nandub/hubot-irc):
#
# export HUBOT_ADAPTER=irc
# export HUBOT_IRC_SERVER=CHANGE-ME-PLEASE
# export HUBOT_IRC_PORT=CHANGE-ME-PLEASE
# export HUBOT_IRC_NICK=CHANGE-ME-PLEASE
# export HUBOT_IRC_PASSWORD=CHANGE-ME-PLEASE
# export HUBOT_IRC_ROOMS=CHANGE-ME-PLEASE
# export HUBOT_IRC_NICKSERV_USERNAME=CHANGE-ME-PLEASE
# export HUBOT_IRC_NICKSERV_PASSWORD=CHANGE-ME-PLEASE
# export HUBOT_IRC_SERVER_FAKE_SSL=CHANGE-ME-PLEASE
# export HUBOT_IRC_USESSL=CHANGE-ME-PLEASE
# export HUBOT_IRC_UNFLOOD=CHANGE-ME-PLEASE

# Mattermost settings (https://github.com/loafoe/hubot-matteruser):
#
# export HUBOT_ADAPTER=matteruser
# export MATTERMOST_HOST=CHANGE-ME-PLEASE
# export MATTERMOST_GROUP=CHANGE-ME-PLEASE
# export MATTERMOST_USER=CHANGE-ME-PLEASE
# export MATTERMOST_PASSWORD=CHANGE-ME-PLEASE
# Optional:
# export MATTERMOST_WSS_PORT=443
# export MATTERMOST_HTTP_PORT=443
# export MATTERMOST_TLS_VERIFY=true
# export MATTERMOST_USE_TLS=true
# export MATTERMOST_LOG_LEVEL=info
# export MATTERMOST_REPLY=true

# RocketChat settings (https://github.com/RocketChat/hubot-rocketchat):
#
# export HUBOT_ADAPTER=rocketchat
# export ROCKETCHAT_URL=CHANGE-ME-PLEASE
# export ROCKETCHAT_USER=CHANGE-ME-PLEASE
# export ROCKETCHAT_PASSWORD=CHANGE-ME-PLEASE
# export ROCKETCHAT_ROOM=CHANGE-ME-PLEASE
# Optional:
# export ROCKETCHAT_AUTH=password
# export LISTEN_ON_ALL_PUBLIC=false
# export RESPOND_TO_DM=false
# export RESPOND_TO_EDITED=false
# export ROOM_ID_CACHE_SIZE=10
# export DM_ROOM_ID_CACHE_SIZE=100
# export ROOM_ID_CACHE_MAX_AGE=300
export HUBOT_ADAPTER={{ st2_chatops_hubot_adapter }}
